ANDROID_SRC_DIR=/home/zod/mydroid_froyo32bit

android_dir_dx=$(ANDROID_SRC_DIR)/out/host/linux-x86/bin/dx  
android_dir_aapt=$(ANDROID_SRC_DIR)/out/host/linux-x86/bin/aapt

#dex format
target_jar=hw.jar
source_java=hw

all:  
	javac $(source_java).java 
	#jar -cfm Helloworld.jar Manifest.txt Helloworld.class
	$(android_dir_dx) --dex --output=$(target_jar) $(source_java).class
	#$(android_dir_aapt) add h.jar	Helloworld.dex
	adb push $(target_jar) /data/test
	adb shell dalvikvm -cp /data/test/$(target_jar) $(source_java)
clean:  
	@rm *.jar *.class 
